from base import Base
from selenium.webdriver.common.by import By
from time import sleep

class GuanZhu(Base):
    guanzhuanniu=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.RelativeLayout[1]/android.widget.LinearLayout/android.widget.ImageView')

    sousuokuang=(By.XPATH,'//android.widget.TextView[@text="动态 书友 话题"]')

    sousuoanniu=(By.XPATH,'//android.widget.TextView[@text="旧美术"]')

    dianji = (By.XPATH,'///hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.TextView[2]')

    def sousuoyewu(self):
        self.find_ele(self.guanzhuanniu).click()
        sleep(2)
        self.find_ele(self.sousuokuang).click()
        sleep(2)
        self.find_ele(self.sousuoanniu).send_keys("旧美术")
        sleep(2)
        self.find_ele(self.dianji).click()
        sleep(2)
        















